package base;


import android.content.res.AssetManager;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.alibaba.android.arouter.launcher.ARouter;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ScreenUtils;
import com.noober.background.BackgroundLibrary;




public abstract class QActivity extends AppCompatActivity implements QUIOperation {

    protected View root;
    protected final String TAG = getClass().getSimpleName();
    private float zt;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        /// 支持通过代码设置圆角不同状态值颜色等
        BackgroundLibrary.inject(this);
        /// 全屏
        ScreenUtils.setFullScreen(this);


        super.onCreate(savedInstanceState);
        // activity进出动画
       // overridePendingTransition(R.animator.slide_in_right, R.animator.slide_out_left);

        ARouter.getInstance().inject(this);
        ScreenUtils.setPortrait(this);
        LogUtils.dTag(TAG, "onCreate");

        setContentView(getLayoutRes());
        root = findViewById(android.R.id.content);


        LogUtils.d(TAG, "initView");

        initView();
        LogUtils.d(TAG, "initData");
        initData();
        LogUtils.d(TAG, "initListener");
        initListener();
        LogUtils.d(TAG, "networkMessage");
        networkMessage();
    }


    @Override
    protected void onStart() {
        LogUtils.dTag(TAG, "onStart");
        super.onStart();
    }

    @Override
    protected void onRestart() {
        LogUtils.dTag(TAG, "onRestart");
        super.onRestart();
    }

    @Override
    protected void onResume() {
        LogUtils.dTag(TAG, "onResume");
        super.onResume();

    }

    @Override
    protected void onPause() {
        LogUtils.dTag(TAG, "onPause");
        super.onPause();

    }

    @Override
    protected void onStop() {
        LogUtils.dTag(TAG, "onStop");
        super.onStop();
    }

    @Override
    protected void onDestroy() {
        LogUtils.dTag(TAG, "onDestroy");

        super.onDestroy();

    }






}
